<template>
	<!-- 我的诊疗单 -->
	<view>
		<view class="ZLD" v-if="list.length">
			<view v-for="(item,index) of list" :key='index' @click="C_listItem(item.id)">
				<!-- <view class="type">诊疗单类型</view> -->
				<view class="time">上传时间:{{item.createtime}}</view>
			</view>
		</view>
		<image 
			v-else 
			:src="vuex_httpImageUrl && vuex_httpImageUrl+'static/common/wnr.png'" 
			mode="widthFix"
			style="
				display: block;
				margin: 45% auto;
			"
		></image>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list:[]
			};
		},
		onShow() {
			this.def_list()
		},
		methods:{
			def_list(){
				this.$u.post('/health/singlelst').then(res=>{
					console.log(res.data);
					let {count,list} = res.data
					this.list = list
				})
			},
			C_listItem(id){
				uni.navigateTo({
					url:'./detail/detail?id='+id
				})
			}
		}
	}
</script>

<style lang="scss">
	.ZLD{
		>view{
			margin-bottom: 20rpx;
			background-color: #FFFFFF;
			padding: 20rpx 40rpx;
			width: 95%;
			margin: 20rpx auto;
			border-radius: 20rpx;
			.type{
				font-weight: bold;
			}
			.time{
				margin-top: 10rpx;
				font-size: 24rpx;
				color: rgba(0,0,0,.6);
			}
		}
	}
</style>
